Skip to content

Conversation

Knotty123230
Copy link

@Knotty123230 Knotty123230 commented Jul 7, 2025

This PR updates the manual_assert lint to use multipart_suggestion instead of a single span_suggestion.

This change allows Clippy to properly apply suggestions when comments are present before or around the if-then-panic! block. It removes the @no-rustfix annotation in the corresponding UI test and updates the .stderr file accordingly.

Fixes: #13099
changelog: fix manual_assert lint suggestion format

…suggestion

This resolves rust-lang#13099 by converting the suggestion into a multipart suggestion, allowing rustfix to apply it correctly.
@rustbot
Copy link
Collaborator

rustbot commented Jul 7, 2025

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 7, 2025
@Knotty123230 Knotty123230 changed the title fix(clippy::manual_assert): use multipart_suggestion instead of span_… fix(manual_assert): use multipart suggestion instead of simple span_suggestion Jul 7, 2025
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It removes the @no-rustfix annotation in the corresponding UI test

I don't see the removal of @no-rustfix in the changes

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 14, 2025
LL + multiline
LL + comment */
LL + /// Doc comment
LL + // comment after `panic!`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this comment have stayed after panic!, now assert!?

@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2025

☔ The latest upstream changes (possibly #14896) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue: Fix auto-applicable lint suggestions by using multipart suggestions
4 participants